
package com.market.web;

public class ProductInf
{
    private long id;

    private String name;

    private String standard;

    private String unit;

    private float price;

    private int amount;

    public int getAmount()
    {
        return amount;
    }

    public void setAmount(int amount)
    {
        this.amount = amount;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public float getPrice()
    {
        return price;
    }

    public void setPrice(float price)
    {
        this.price = price;
    }

    public String getStandard()
    {
        return standard;
    }

    public void setStandard(String standard)
    {
        this.standard = standard;
    }

    public String getUnit()
    {
        return unit;
    }

    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public float getTotal()
    {
        return price * amount;
    }

    public boolean equals(Object obj)
    {
        // TODO Auto-generated method stub
        ProductInf p = (ProductInf)obj;
        return (p.id == id) && (p.price == price);
    }

    public int hashCode()
    {
        // TODO Auto-generated method stub
        return super.hashCode();
    }

    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

}
